package com.laundry.dao;

import com.laundry.entity.Message;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface MessageDao extends JpaRepository<Message, Long> {
    List<Message> findByUserIdOrderByCreateTimeDesc(Long userId);
    List<Message> findByUserIdAndReadStatusOrderByCreateTimeDesc(Long userId, Integer readStatus);
    int countByUserIdAndReadStatus(Long userId, Integer readStatus);
} 